//
//  KyNavigationViewController.swift
//  KyTV
//
//  Created by fangyukui on 2017/10/22.
//  Copyright © 2017年 fangyukui. All rights reserved.
//

import UIKit

class KyNavigationViewController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
//        var count : UInt32 = 0
//        
//        let ivars = class_copyIvarList(UIGestureRecognizer.self, &count)
//        
//        for i in 0..<count {
//            let nameP =  ivar_getName(ivars?[Int(i)]!)
//            let name = String(cString: nameP!)
//            KyLog(message: name)
//            
//        }
        
        
     
        guard let objs =  interactivePopGestureRecognizer?.value(forKey: "_targets") as? [NSObject] else {
             return
        }
        let obj = objs[0]
        
        let target = obj.value(forKey: "target")
        
        let action = Selector(("handleNavigationTransition:"))
        
        let panGes = UIPanGestureRecognizer(target: target, action: action)
        
        view.addGestureRecognizer(panGes)
        
        
        
    }
    
     @objc fileprivate  func showT(){
        KyLog(message: "hello")
    }

    override var preferredStatusBarStyle: UIStatusBarStyle{
        return .lightContent
    }
    
    
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        
        viewController.hidesBottomBarWhenPushed = true
        super.pushViewController(viewController, animated: true)
    }
    
    
    
    
}
